package gaspider;

import java.text.DateFormat;
import java.util.Date;

public class DateDemo4 {  
	  
    public static void main(String[] args) {  
          
        Date date = new Date();  
        DateFormat shortFormat = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT);  
        DateFormat mediumFormat = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM);  
        DateFormat longFormat = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG);  
        DateFormat fullFormat = DateFormat.getDateTimeInstance(DateFormat.FULL, DateFormat.FULL);  
          
        System.out.println(shortFormat.format(date));  
        System.out.println(mediumFormat.format(date));  
        System.out.println(longFormat.format(date));  
        System.out.println(fullFormat.format(date));  
          
    }  
  
}